-- GENERATED SPELL FOR [Anvilrage Medic] --


function spell0_8894(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(15586,pUnit)
pUnit:RegisterEvent('Sorts_8894', 3500, 1)
end

function spell1_8894(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(15587,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8894', 1500, 1)
end

function spell2_8894(pUnit, Event) --@Power Word: Fortitude,n/a--
pUnit:FullCastSpellOnTarget(13864,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8894', 612, 1)
end

function spell3_8894(pUnit, Event) --@Prayer of Healing,Self--
pUnit:FullCastSpellOnTarget(15585,pUnit)
pUnit:RegisterEvent('Sorts_8894', 3000, 1)
end

function Sorts_8894(pUnit, Event)
local choix_sorts_8894 = math.random(0, 3)
if choix_sorts_8894 == 0 then
pUnit:RegisterEvent('spell0_8894', 1, 1)
end
if choix_sorts_8894 == 1 then
pUnit:RegisterEvent('spell1_8894', 1, 1)
end
if choix_sorts_8894 == 2 then
pUnit:RegisterEvent('spell2_8894', 1, 1)
end
if choix_sorts_8894 == 3 then
pUnit:RegisterEvent('spell3_8894', 1, 1)
end
end

function mob8894_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8894', math.random(1500, 3000), 1)
end

function mob8894_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8894_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8894_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8894, 1, 'mob8894_Action')
RegisterUnitEvent(8894, 2, 'mob8894_Leave')
RegisterUnitEvent(8894, 3, 'mob8894_Kill')
RegisterUnitEvent(8894, 4, 'mob8894_Die')
